home *** CD-ROM | disk | FTP | other *** search
/ Interactive Web Graphics with Shout 3D / Interactive Web Graphics With Shout 3D.iso / mac / Shout3Ddemo / Shout3d_runtime / codebase / models / viewpointTest.s3d < prev    next >
Text File  |  2000-05-30  |  6KB  |  186 lines

  1. #VRML V2.0 utf8
  2.  
  3. Transform {
  4.     translation 0 4 0
  5.     rotation 1 0 0 0.4
  6.     children [
  7.  
  8.         DEF CUBE2 Transform {
  9.             translation 0 2 0
  10.             children [
  11.                 Shape {
  12.                     appearance Appearance {
  13.                         material Material {diffuseColor 1 0 0 emissiveColor 0 0 0.5}
  14.                     }
  15.                     geometry IndexedFaceSet {
  16.                         coord Coordinate {
  17.                             point [
  18.                                 -1 -1 1
  19.                                 -1 1 1
  20.                                 1 1 1
  21.                                 1 -1 1
  22.                                 -1 -1 -1
  23.                                 -1 1 -1
  24.                                 1 1 -1
  25.                                 1 -1 -1
  26.                                            
  27.                             ]
  28.                         }
  29.                         texCoord TextureCoordinate {
  30.                             point [
  31.                                 0 0
  32.                                 1 0
  33.                                 1 1
  34.                                 0 1
  35.                             ]
  36.                         }
  37.                         coordIndex [
  38.                             0 3 1 -1
  39.                             3 2 1 -1
  40.                             3 7 2 -1
  41.                             7 6 2 -1
  42.                             7 4 6 -1
  43.                             4 5 6 -1
  44.                             4 0 5 -1
  45.                             0 1 5 -1
  46.                             1 2 5 -1
  47.                             2 6 5 -1
  48.                             0 4 3 -1
  49.                             4 7 3 -1
  50.                         ]
  51.                         texCoordIndex [
  52.                             0 1 3 -1
  53.                             1 2 3 -1
  54.                             0 1 3 -1
  55.                             1 2 3 -1
  56.                             0 1 3 -1
  57.                             1 2 3 -1
  58.                             0 1 3 -1
  59.                             1 2 3 -1
  60.                             0 1 3 -1
  61.                             1 2 3 -1
  62.                             0 1 3 -1
  63.                             1 2 3 -1
  64.                         ]
  65.                     }
  66.                 }
  67.             ]
  68.         }
  69.         DEF MyTrans Transform {
  70.             translation 0 0 0
  71.             rotation 0 1 0 0.9
  72.             children [
  73.                 Transform {
  74.                     translation 0 1 0
  75.                     rotation 1 0 0 -0.4
  76.                     children [
  77.                         DEF Camera Viewpoint{
  78.                             fieldOfView 0.785398
  79.                             position 0 0 10
  80.                         }
  81.                     ]
  82.                 }
  83.                 DEF CUBE1 Transform {
  84.                     translation 0 -1 0
  85.                     rotation 0 1 0 -0.6
  86.                     children [
  87.                         Shape {
  88.                             appearance Appearance {
  89.                                 material Material {diffuseColor 1 0 0 emissiveColor 0 0.5 0}
  90.                             }
  91.                             geometry IndexedFaceSet {
  92.                                 coord Coordinate {
  93.                                     point [
  94.                                         -1 -1 1
  95.                                         -1 1 1
  96.                                         1 1 1
  97.                                         1 -1 1
  98.                                         -1 -1 -1
  99.                                         -1 1 -1
  100.                                         1 1 -1
  101.                                         1 -1 -1
  102.                                            
  103.                                     ]
  104.                                 }
  105.                                 texCoord TextureCoordinate {
  106.                                     point [
  107.                                         0 0
  108.                                         1 0
  109.                                         1 1
  110.                                         0 1
  111.                                     ]
  112.                                 }
  113.                                 coordIndex [
  114.                                     0 3 1 -1
  115.                                     3 2 1 -1
  116.                                     3 7 2 -1
  117.                                     7 6 2 -1
  118.                                     7 4 6 -1
  119.                                     4 5 6 -1
  120.                                     4 0 5 -1
  121.                                     0 1 5 -1
  122.                                     1 2 5 -1
  123.                                     2 6 5 -1
  124.                                     0 4 3 -1
  125.                                     4 7 3 -1
  126.                                 ]
  127.                                 texCoordIndex [
  128.                                     0 1 3 -1
  129.                                     1 2 3 -1
  130.                                     0 1 3 -1
  131.                                     1 2 3 -1
  132.                                     0 1 3 -1
  133.                                     1 2 3 -1
  134.                                     0 1 3 -1
  135.                                     1 2 3 -1
  136.                                     0 1 3 -1
  137.                                     1 2 3 -1
  138.                                     0 1 3 -1
  139.                                     1 2 3 -1
  140.                                 ]
  141.                             }
  142.                         }
  143.                     ]
  144.                 }
  145.             ]
  146.         }
  147.     ]
  148. }
  149.  
  150.  
  151.  
  152.  
  153. DEF TIMER TimeSensor{
  154.   cycleInterval 5.333
  155.   loop TRUE
  156. }
  157. DEF MYINTERP OrientationInterpolator{
  158.     key[
  159.         0 0.33 0.66 1
  160.     ]
  161.     keyValue[
  162.         0 1 0 0
  163.         0 1 0 2.094
  164.         0 1 0 4.189
  165.         0 1 0 0
  166.     ]
  167. }
  168. DEF MYINTERP2 PositionInterpolator{
  169.     key[
  170.         0 0.25 0.5 0.75 1
  171.     ]
  172.     keyValue[
  173.         -1 0 -1
  174.         1 0 -1
  175.         1 0 1
  176.         -1 0 1
  177.         -1 0 -1
  178.     ]
  179. }
  180.  
  181. ROUTE TIMER.fraction_changed TO MYINTERP.set_fraction
  182. ROUTE MYINTERP.value_changed TO MyTrans.set_rotation
  183. ROUTE TIMER.fraction_changed TO MYINTERP2.set_fraction
  184. ROUTE MYINTERP2.value_changed TO MyTrans.set_translation
  185.  
  186.